﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using System.IO;
using System.Web;
using System.Threading.Tasks;
using System.Data;
using BartonExtension;
using ResponseObject;
using SQLWrapper;
using Model.App;
using Model.Images;
using Model.Weixin;
using Services.Common;
using Services.PushNotification;

namespace iShangMai.Controllers.App
{
    public class NotificationController : ApiController
    {
        [HttpGet]
        public ZKResponse PushNotification(string identifier,string fromId,ISMPushType type,string icon_url,string title,string context,string state,string socket_token)
        {
            ZKResponse response = new ZKResponse();
            ISMPushContent content = new ISMPushContent()
            {
                receiverId = identifier,
                fromId = fromId,
                type = type,
                icon_url = icon_url,
                title = title,
                context = context,
                state = state
            };
            Pusher.Push(content);
            return response;
        }
    }
}
